
//- This Source Code Form is subject to the terms of the Mozilla Public
//- License, v. 2.0. If a copy of the MPL was not distributed with this
//- file, You can obtain one at http://mozilla.org/MPL/2.0/.
//-
//- Copyright (c) 2021-present Kaleidos Ventures SL

ul(class="paginator")
    <% if (showPrevious) { %>
    li(class="previous")
        a(href="", class="previous next_prev_button", class="disabled")
            tg-svg(svg-icon="icon-arrow-left")
            span(translate="PAGINATION.PREVIOUS")
    <% } %>
    <% _.each(pages, function(item) { %>
    li(class!="<%- item.classes %>")
        <% if (item.type === "page") { %>
        a(href="", data-pagenum!="<%- item.num %>") <%- item.num %></a>
        <% } else if (item.type === "page-active") { %>
        span(class="active") <%- item.num %>
        <% } else { %>
        span ...
        <% } %>
    <% }); %>

    <% if (showNext) { %>
    li(class="next")
        a(href="", class="next next_prev_button", class="disabled")
            span(translate="PAGINATION.NEXT")
            tg-svg(svg-icon="icon-arrow-right")
    <% } %>
